﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BlueCMS.Core.Entities
{
    public class WebpageNodeLink
    {
        public Guid webpage_id { get; set; }
        public Guid node_id { get; set; }
        public Guid website_id { get; set; }

        public WebpageNodeLink Init(Webpage webpage, Node node)
        {
            if (webpage.website_id != node.website_id)
            {
                throw new ArgumentException("Webpage and Node not from same website.");
            }

            webpage_id = webpage.website_id;
            node_id = node.node_id;
            website_id = webpage.website_id;

            return this;
        }
    }
}
